package decModel;

public class DecModel1 {
	public static void main(String[] args) {
		MathineCat mcat=new MathineCat(new Animal());
		mcat.run();
	}

}
class Animal{
	public void run(){
		System.out.println("I can run");
	}
}
class MathineCat{
	Animal an=null;

	public MathineCat(Animal an) {
		super();
		this.an = an;
	}
	public void run(){
		System.out.println("I can fly");
		System.out.println("I am good at fighting");
        an.run();		
	}
}